package com.wty.member.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.wty.commons.id.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author:wangtianyu
 * @Date：Created on 2020/4/28 0028 17:31
 */
@MapperScan("com.wty.member.mapper")
@Configuration
public class MyBatisConfig {
    /**
     * 分页
     *
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

    @Bean
    public IdWorker idWorker() {
        return new IdWorker(0, 0);
    }

}
